package com.Qinmeiwei.web.pojo.base;

import java.io.Serializable;


public abstract class BaseIpRecordPK implements Serializable {

	protected int hashCode = Integer.MIN_VALUE;

	private java.lang.String entityType;
	private java.lang.String entityId;


	public BaseIpRecordPK () {}
	
	public BaseIpRecordPK (
		java.lang.String entityType,
		java.lang.String entityId) {

		this.setEntityType(entityType);
		this.setEntityId(entityId);
	}


	/**
	 * Return the value associated with the column: entity_type
	 */
	public java.lang.String getEntityType () {
		return entityType;
	}

	/**
	 * Set the value related to the column: entity_type
	 * @param entityType the entity_type value
	 */
	public void setEntityType (java.lang.String entityType) {
		this.entityType = entityType;
	}



	/**
	 * Return the value associated with the column: entity_id
	 */
	public java.lang.String getEntityId () {
		return entityId;
	}

	/**
	 * Set the value related to the column: entity_id
	 * @param entityId the entity_id value
	 */
	public void setEntityId (java.lang.String entityId) {
		this.entityId = entityId;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.Qinmeiwei.web.pojo.IpRecordPK)) return false;
		else {
			com.Qinmeiwei.web.pojo.IpRecordPK mObj = (com.Qinmeiwei.web.pojo.IpRecordPK) obj;
			if (null != this.getEntityType() && null != mObj.getEntityType()) {
				if (!this.getEntityType().equals(mObj.getEntityType())) {
					return false;
				}
			}
			else {
				return false;
			}
			if (null != this.getEntityId() && null != mObj.getEntityId()) {
				if (!this.getEntityId().equals(mObj.getEntityId())) {
					return false;
				}
			}
			else {
				return false;
			}
			return true;
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			StringBuilder sb = new StringBuilder();
			if (null != this.getEntityType()) {
				sb.append(this.getEntityType().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			if (null != this.getEntityId()) {
				sb.append(this.getEntityId().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			this.hashCode = sb.toString().hashCode();
		}
		return this.hashCode;
	}


}